Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ci-info

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ci-info

Get details about the current Continuous Integration environment

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
53M
increased by4.23%
Maintainers
2
Weekly downloads
 
Created

What is ci-info?

The ci-info npm package provides information about the Continuous Integration (CI) environment that your code is running in. It can detect if the current environment is a CI server and provide details about which one it is. This is useful for adjusting the behavior of your application or scripts based on whether they are being run in a CI environment or not.

What are ci-info's main functionalities?

Detecting CI environment

This feature allows you to check if your code is running in a CI environment. The property 'isCI' will be true if it is, or false otherwise.

const ci = require('ci-info');

if (ci.isCI) {
  console.log('The code is running in a CI environment.');
} else {
  console.log('This is not a CI environment.');
}

Identifying specific CI service

This feature allows you to check for specific CI services. Each supported CI service has a corresponding property that will be true if the code is running on that service.

const ci = require('ci-info');

if (ci.TRAVIS) {
  console.log('The code is running on Travis CI.');
}

Getting CI service name

This feature allows you to retrieve the name of the CI service that the code is running on, if it is running in a CI environment.

const ci = require('ci-info');

if (ci.isCI) {
  console.log(`The CI service name is ${ci.name}`);
}

Other packages similar to ci-info

Keywords

FAQs

Package last updated on 29 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc